package com.yitongmao.bottompop;

import android.app.Activity;
import android.widget.PopupWindow;

import java.lang.ref.WeakReference;

/**
 * 作者：zhuTH on 2017/5/8 16:25
 */
public class MyPopupCancelListener implements PopupWindow.OnDismissListener {

    private final WeakReference<Activity> activityWeakReference;

    public MyPopupCancelListener(Activity activity) {
        activityWeakReference = new WeakReference<>(activity);
    }

    @Override
    public void onDismiss() {
        if (activityWeakReference.get() != null)
            PopupWindowUtil.showOrHidShade(activityWeakReference.get(), 1);
    }
}
